from django.contrib.syndication.views import Feed
from Section import BlogData
import markdown

class LatestEntriesFeed(Feed):
    title = 'CrimsonFae Blog Most Recent Entries'
    link = '/blog/feeds/'
    description = 'Most recent updates to the CrimsonFae blog'
    def items(self):
        blog = BlogData()
        return blog.getArticle()
    def item_title(self,item):
        return item.title
    def item_description(self,item):
        return markdown.markdown(item.body)
    def item_link(self,item):
        return '/blog/articles/%s' % (item.slug)
        
